﻿using System;
using System.Data;
using System.Runtime.Serialization;
using Titan.Serialization;

namespace Titan.Data
{
    [Serializable]
    public class SurrogatedDataSet : DataSet, ISerializable
    {
        public SurrogatedDataSet() : base() { }
        public SurrogatedDataSet(string dataSetName) : base(dataSetName) { }

        protected SurrogatedDataSet(SerializationInfo info, StreamingContext context)
            : base()
        {
            DataSerializer.Deserialize(this, info, context);
        }


        void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
        {
            DataSerializer.Serialize(this, info, context);

        }
    }
}
